package com.iengoo.servlet.config;

import java.io.IOException;
import java.util.Properties;

/**
 * @author zpym
 * @CopyRight (C) http://www.iengoo.com
 * @brief
 * @email 122162005@qq.com
 * @date 2019-01-28 15:21
 */
public class DBConfig {
    public static String username; // 数据库登录用户名称
    public static String password; // 数据库登录密码
    public static String driver;  // 数据库驱动
    public static String url;     // 数据库对应的地址

    static {
        Properties prop = new Properties();
        try {
            prop.load(DBConfig.class.getClassLoader().getResourceAsStream("jdbc.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        username = prop.getProperty("username");
        password = prop.getProperty("password");
        driver = prop.getProperty("driver");
        url = prop.getProperty("url");
    }
}
